mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
fix nullptr Mangler in LTOModule
Reviewers: kcc, pcc Subscribers: mehdi_amini Differential Revision: https://reviews.llvm.org/D29523 llvm-svn: 294079
This commit is contained in:
parent
3bb4549a53
commit
0994ee929a
@ -16,6 +16,7 @@
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Bitcode/BitcodeReader.h"
|
||||
#include "llvm/CodeGen/Analysis.h"
|
||||
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DiagnosticPrinter.h"
|
||||
#include "llvm/IR/LLVMContext.h"
|
||||
@ -647,11 +648,15 @@ void LTOModule::parseMetadata() {
|
||||
}
|
||||
}
|
||||
|
||||
// Globals
|
||||
// Globals - we only need to do this for COFF.
|
||||
const Triple TT(_target->getTargetTriple());
|
||||
if (!TT.isOSBinFormatCOFF())
|
||||
return;
|
||||
Mangler M;
|
||||
for (const NameAndAttributes &Sym : _symbols) {
|
||||
if (!Sym.symbol)
|
||||
continue;
|
||||
_target->getObjFileLowering()->emitLinkerFlagsForGlobal(OS, Sym.symbol);
|
||||
emitLinkerFlagsForGlobalCOFF(OS, Sym.symbol, TT, M);
|
||||
}
|
||||
|
||||
// Add other interesting metadata here.
|
||||
|
Loading…
Reference in New Issue
Block a user