From 017597540e645ee69b336802d30c0e52f8a575d9 Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Mon, 17 Oct 2011 23:54:22 +0000 Subject: Object: Add isSymbolWeak. llvm-svn: 142316 --- llvm/lib/Object/COFFObjectFile.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/lib/Object/COFFObjectFile.cpp') diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 6fdb263d8e3..0859bca40ad 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -168,6 +168,13 @@ error_code COFFObjectFile::isSymbolGlobal(DataRefImpl Symb, return object_error::success; } +error_code COFFObjectFile::isSymbolWeak(DataRefImpl Symb, + bool &Result) const { + const coff_symbol *symb = toSymb(Symb); + Result = (symb->StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL); + return object_error::success; +} + error_code COFFObjectFile::getSymbolSize(DataRefImpl Symb, uint64_t &Result) const { // FIXME: Return the correct size. This requires looking at all the symbols -- cgit v1.2.3