diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-20 06:22:27 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-20 06:22:27 +0000 |
commit | 36fc3aa1e30c69fc454d7cddd6e39f32a93db848 (patch) | |
tree | 91aa366f3056f38a60b164a3ffdd23fe4308f976 /tools/driver/cc1as_main.cpp | |
parent | cb8095f766f1fe3d664d90ec450093468933f23c (diff) |
Match LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/driver/cc1as_main.cpp')
-rw-r--r-- | tools/driver/cc1as_main.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index b0177c7029..fe7e4f7606 100644 --- a/tools/driver/cc1as_main.cpp +++ b/tools/driver/cc1as_main.cpp @@ -30,6 +30,7 @@ #include "llvm/MC/MCCodeEmitter.h" #include "llvm/MC/MCContext.h" #include "llvm/MC/MCInstrInfo.h" +#include "llvm/MC/MCObjectFileInfo.h" #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCStreamer.h" #include "llvm/MC/MCSubtargetInfo.h" @@ -277,7 +278,12 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, Diagnostic &Diags) { } const TargetAsmInfo *tai = new TargetAsmInfo(*TM); - MCContext Ctx(*MAI, *MRI, tai); + // FIXME: This is not pretty. MCContext has a ptr to MCObjectFileInfo and + // MCObjectFileInfo needs a MCContext reference in order to initialize itself. + OwningPtr<MCObjectFileInfo> MOFI(new MCObjectFileInfo()); + MCContext Ctx(*MAI, *MRI, MOFI.get(), tai); + // FIXME: Assembler behavior can change with -static. + MOFI->InitMCObjectFileInfo(Opts.Triple, Reloc::Default, Ctx); if (Opts.SaveTemporaryLabels) Ctx.setAllowTemporaryLabels(false); |