aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/IRObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
-rw-r--r--llvm/lib/Object/IRObjectFile.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Object/IRObjectFile.cpp b/llvm/lib/Object/IRObjectFile.cpp
index 5548a38..49737b5 100644
--- a/llvm/lib/Object/IRObjectFile.cpp
+++ b/llvm/lib/Object/IRObjectFile.cpp
@@ -266,10 +266,7 @@ basic_symbol_iterator IRObjectFile::symbol_end_impl() const {
ErrorOr<MemoryBufferRef> IRObjectFile::findBitcodeInObject(const ObjectFile &Obj) {
for (const SectionRef &Sec : Obj.sections()) {
- StringRef SecName;
- if (std::error_code EC = Sec.getName(SecName))
- return EC;
- if (SecName == ".llvmbc") {
+ if (Sec.isBitcode()) {
StringRef SecContents;
if (std::error_code EC = Sec.getContents(SecContents))
return EC;