diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-30 22:49:27 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-30 22:49:27 +0000 |
commit | f7792a99b0ae87f766c634d69a76a5d05f264722 (patch) | |
tree | df30b84227f0b63cafb7a47eaa200521d7f5bb9b /include/llvm/MC/MCValue.h | |
parent | 25a8ae3f10965b47ecaa9eda5e997f16fe1d9414 (diff) | |
download | external_llvm-f7792a99b0ae87f766c634d69a76a5d05f264722.zip external_llvm-f7792a99b0ae87f766c634d69a76a5d05f264722.tar.gz external_llvm-f7792a99b0ae87f766c634d69a76a5d05f264722.tar.bz2 |
llvm-mc: Symbols in a relocatable expression of the (a - b + cst) form are
allowed to be undefined when the expression is seen, we cannot enforce the
same-section requirement until the entire assembly file has been seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCValue.h')
-rw-r--r-- | include/llvm/MC/MCValue.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/MC/MCValue.h b/include/llvm/MC/MCValue.h index df834c7..174992e 100644 --- a/include/llvm/MC/MCValue.h +++ b/include/llvm/MC/MCValue.h @@ -26,7 +26,8 @@ class MCSymbol; /// relocations of this general form, but we need to represent this anyway. /// /// In the general form, SymbolB can only be defined if SymbolA is, and both -/// must be in the same (non-external) section. +/// must be in the same (non-external) section. The latter constraint is not +/// enforced, since a symbol's section may not be known at construction. /// /// Note that this class must remain a simple POD value class, because we need /// it to live in unions etc. @@ -52,9 +53,7 @@ public: static MCValue get(MCSymbol *SymA, MCSymbol *SymB = 0, int64_t Val = 0) { MCValue R; - assert((!SymB || (SymA && SymA->getSection() && - SymA->getSection() == SymB->getSection())) && - "Invalid relocatable MCValue!"); + assert((!SymB || SymA) && "Invalid relocatable MCValue!"); R.Cst = Val; R.SymA = SymA; R.SymB = SymB; |