forked from OSchip/llvm-project
parent
c233f74e6e
commit
b633d20d36
|
@ -604,7 +604,10 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
|
|||
if (!TM)
|
||||
TM.reset(CreateTargetMachine(UsesCodeGen));
|
||||
|
||||
if (UsesCodeGen && !TM) return;
|
||||
if (UsesCodeGen && !TM)
|
||||
return;
|
||||
if (TM)
|
||||
TheModule->setDataLayout(*TM->getDataLayout());
|
||||
CreatePasses();
|
||||
|
||||
switch (Action) {
|
||||
|
|
|
@ -3827,12 +3827,11 @@ CXString clang_Cursor_getMangling(CXCursor C) {
|
|||
// Now apply backend mangling.
|
||||
std::unique_ptr<llvm::DataLayout> DL(
|
||||
new llvm::DataLayout(Ctx.getTargetInfo().getTargetDescription()));
|
||||
llvm::Mangler BackendMangler(DL.get());
|
||||
|
||||
std::string FinalBuf;
|
||||
llvm::raw_string_ostream FinalBufOS(FinalBuf);
|
||||
BackendMangler.getNameWithPrefix(FinalBufOS,
|
||||
llvm::Twine(FrontendBufOS.str()));
|
||||
llvm::Mangler::getNameWithPrefix(FinalBufOS, llvm::Twine(FrontendBufOS.str()),
|
||||
*DL);
|
||||
|
||||
return cxstring::createDup(FinalBufOS.str());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue