projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[llvm-dwp] Add coverage for both the presence and absence of type units, and fix...
[oota-llvm.git]
/
include
/
llvm
/
Object
/
COFFImportFile.h
diff --git
a/include/llvm/Object/COFFImportFile.h
b/include/llvm/Object/COFFImportFile.h
index 603a0cdfe5d1f52fe183d9d831e0946df76ba6f3..b04a44ea60d2a9f952cda1279c3216dab579efea 100644
(file)
--- a/
include/llvm/Object/COFFImportFile.h
+++ b/
include/llvm/Object/COFFImportFile.h
@@
-37,7
+37,7
@@
public:
std::error_code printSymbolName(raw_ostream &OS,
DataRefImpl Symb) const override {
std::error_code printSymbolName(raw_ostream &OS,
DataRefImpl Symb) const override {
- if (Symb.p ==
1
)
+ if (Symb.p ==
0
)
OS << "__imp_";
OS << StringRef(Data.getBufferStart() + sizeof(coff_import_header));
return std::error_code();
OS << "__imp_";
OS << StringRef(Data.getBufferStart() + sizeof(coff_import_header));
return std::error_code();
@@
-57,11
+57,14
@@
public:
return BasicSymbolRef(Symb, this);
}
return BasicSymbolRef(Symb, this);
}
+ const coff_import_header *getCOFFImportHeader() const {
+ return reinterpret_cast<const object::coff_import_header *>(
+ Data.getBufferStart());
+ }
+
private:
bool isCode() const {
private:
bool isCode() const {
- auto *Import = reinterpret_cast<const object::coff_import_header *>(
- Data.getBufferStart());
- return Import->getType() == COFF::IMPORT_CODE;
+ return getCOFFImportHeader()->getType() == COFF::IMPORT_CODE;
}
};
}
};