本文整理汇总了C++中clang::ASTContext::createMangleContext方法的典型用法代码示例。如果您正苦于以下问题:C++ ASTContext::createMangleContext方法的具体用法?C++ ASTContext::createMangleContext怎么用?C++ ASTContext::createMangleContext使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clang::ASTContext
的用法示例。
在下文中一共展示了ASTContext::createMangleContext方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mPP
RSContext::RSContext(clang::Preprocessor &PP,
clang::ASTContext &Ctx,
const clang::TargetInfo &Target,
PragmaList *Pragmas,
unsigned int TargetAPI,
std::vector<std::string> *GeneratedFileNames)
: mPP(PP),
mCtx(Ctx),
mTarget(Target),
mPragmas(Pragmas),
mTargetAPI(TargetAPI),
mGeneratedFileNames(GeneratedFileNames),
mTargetData(NULL),
mLLVMContext(llvm::getGlobalContext()),
mLicenseNote(NULL),
mRSPackageName("android.renderscript"),
version(0),
mMangleCtx(Ctx.createMangleContext()) {
slangAssert(mGeneratedFileNames && "Must supply GeneratedFileNames");
// For #pragma rs export_type
PP.AddPragmaHandler(
"rs", RSPragmaHandler::CreatePragmaExportTypeHandler(this));
// For #pragma rs java_package_name
PP.AddPragmaHandler(
"rs", RSPragmaHandler::CreatePragmaJavaPackageNameHandler(this));
// For #pragma rs set_reflect_license
PP.AddPragmaHandler(
"rs", RSPragmaHandler::CreatePragmaReflectLicenseHandler(this));
// For #pragma version
PP.AddPragmaHandler(RSPragmaHandler::CreatePragmaVersionHandler(this));
// Prepare target data
mTargetData = new llvm::TargetData(Target.getTargetDescription());
return;
}
示例2: mPP
RSContext::RSContext(clang::Preprocessor &PP,
clang::ASTContext &Ctx,
const clang::TargetInfo &Target,
PragmaList *Pragmas,
unsigned int TargetAPI,
bool Verbose)
: mPP(PP),
mCtx(Ctx),
mPragmas(Pragmas),
mTargetAPI(TargetAPI),
mVerbose(Verbose),
mDataLayout(NULL),
mLLVMContext(llvm::getGlobalContext()),
mLicenseNote(NULL),
mRSPackageName("android.renderscript"),
version(0),
mMangleCtx(Ctx.createMangleContext()),
mIs64Bit(Target.getPointerWidth(0) == 64) {
AddPragmaHandlers(PP, this);
// Prepare target data
mDataLayout = new llvm::DataLayout(Target.getTargetDescription());
}
示例3: Initialize
virtual void Initialize(clang::ASTContext& Ctx) override {
annotator.setSourceMgr(Ctx.getSourceManager(), Ctx.getLangOpts());
annotator.setMangleContext(Ctx.createMangleContext());
ci.getPreprocessor().addPPCallbacks(maybe_unique(new PreprocessorCallback(annotator, ci.getPreprocessor())));
ci.getDiagnostics().setClient(new BrowserDiagnosticClient(annotator), true);
}