diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-03-15 23:51:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-03-15 23:51:06 +0000 |
commit | 55992564152f0fce6758a4495cc39422f5e1cc94 (patch) | |
tree | 6b19f3141c4e0769af3bdea5176c77a85e4e5f8d /llvm/lib/Target/X86/X86TargetObjectFile.cpp | |
parent | 0adf3182b02d9c89ae86cfb3d0ac218a1186a5bd (diff) | |
download | llvm-55992564152f0fce6758a4495cc39422f5e1cc94.zip llvm-55992564152f0fce6758a4495cc39422f5e1cc94.tar.gz llvm-55992564152f0fce6758a4495cc39422f5e1cc94.tar.bz2 |
MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
- Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue.
- This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol.
llvm-svn: 98592
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetObjectFile.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86TargetObjectFile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86TargetObjectFile.cpp b/llvm/lib/Target/X86/X86TargetObjectFile.cpp index f75d41a..c15dfbb 100644 --- a/llvm/lib/Target/X86/X86TargetObjectFile.cpp +++ b/llvm/lib/Target/X86/X86TargetObjectFile.cpp @@ -7,11 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "X86MCTargetExpr.h" #include "X86TargetObjectFile.h" #include "X86TargetMachine.h" #include "llvm/CodeGen/MachineModuleInfoImpls.h" #include "llvm/MC/MCContext.h" +#include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSectionMachO.h" #include "llvm/Target/Mangler.h" #include "llvm/ADT/SmallString.h" @@ -29,7 +29,7 @@ getExprForDwarfGlobalReference(const GlobalValue *GV, Mangler *Mang, if (Encoding & (DW_EH_PE_indirect | DW_EH_PE_pcrel)) { const MCSymbol *Sym = Mang->getSymbol(GV); const MCExpr *Res = - X86MCTargetExpr::Create(Sym, X86MCTargetExpr::GOTPCREL, getContext()); + MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, getContext()); const MCExpr *Four = MCConstantExpr::Create(4, getContext()); return MCBinaryExpr::CreateAdd(Res, Four, getContext()); } |