summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/MachOObjectFile.cpp
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
commit34e1707fbbec87f1d978b892efccfdb73ff5068a (patch)
treeafbdf6753d525201b3511176181c574e3bcd6964 /llvm/lib/Object/MachOObjectFile.cpp
parent4ffde88b4203cfedf0e063049c059fc6d5b3ba44 (diff)
downloadbcm5719-llvm-34e1707fbbec87f1d978b892efccfdb73ff5068a.tar.gz
bcm5719-llvm-34e1707fbbec87f1d978b892efccfdb73ff5068a.zip
Don't label a STAB debugging symbol as a function symbol.
llvm-svn: 141824
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index 0d4dbd9ec45..86d87ed0f2f 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud