summaryrefslogtreecommitdiff
path: root/lib/Object
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-10-12 22:23:12 +0000
committerOwen Anderson <resistor@mac.com>2011-10-12 22:23:12 +0000
commit10a8c62d46bca8632fd827f3afc13235d81e47fd (patch)
tree598b3afb409306782fe6a89ae857c89076dcbe07 /lib/Object
parentcd74988fb94ffc180196fed9aa2c8ee548915f86 (diff)
downloadllvm-10a8c62d46bca8632fd827f3afc13235d81e47fd.tar.gz
llvm-10a8c62d46bca8632fd827f3afc13235d81e47fd.tar.bz2
llvm-10a8c62d46bca8632fd827f3afc13235d81e47fd.tar.xz
Don't label a STAB debugging symbol as a function symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141824 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r--lib/Object/MachOObjectFile.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp
index 0d4dbd9ec4..86d87ed0f2 100644
--- a/lib/Object/MachOObjectFile.cpp
+++ b/lib/Object/MachOObjectFile.cpp
@@ -241,6 +241,11 @@ error_code MachOObjectFile::getSymbolType(DataRefImpl Symb,
n_type = Entry->Type;
}
Res = SymbolRef::ST_Other;
+
+ // If this is a STAB debugging symbol, we can do nothing more.
+ if (n_type & MachO::NlistMaskStab)
+ return object_error::success;
+
switch (n_type & MachO::NlistMaskType) {
case MachO::NListTypeUndefined :
Res = SymbolRef::ST_External;