diff options
Diffstat (limited to 'lib')
129 files changed, 4273 insertions, 315 deletions
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 83756daa7a..f25a6809e4 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1481,6 +1481,14 @@ bool BitcodeReader::ParseModule(bool Resume) { std::string S; if (ConvertToString(Record, 0, S)) return Error("Invalid MODULE_CODE_TRIPLE record"); + + // @LOCALMOD-BEGIN + // This hack is needed in order to get Clang compiled binaries + // working with the Gold plugin, until PNaCl backend is introduced + // in lib/Target/PNaCl. + if (S == "le32-unknown-nacl") + S = "armv7-none-linux-gnueabi"; + // @LOCALMOD-END TheModule->setTargetTriple(S); break; } diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index eeacc43c09..01f75a78b7 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -156,6 +156,11 @@ bool AsmPrinter::doInitialization(Module &M) { MMI = getAnalysisIfAvailable<MachineModuleInfo>(); MMI->AnalyzeModule(M); + // @LOCALMOD-BEGIN + IsPlainObject = + (MMI->getModule()->getOutputFormat() == Module::ObjectOutputFormat); + // @LOCALMOD-END + // Initialize TargetLoweringObjectFile. const_cast<TargetLoweringObjectFile&>(getObjFileLowering()) .Initialize(OutContext, TM); @@ -272,6 +277,17 @@ void AsmPrinter::EmitGlobalVariable(const Glob |