summaryrefslogtreecommitdiff
path: root/COFF/InputFiles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'COFF/InputFiles.cpp')
-rw-r--r--COFF/InputFiles.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/COFF/InputFiles.cpp b/COFF/InputFiles.cpp
index cb56e13014db9..df3b6a032cf8e 100644
--- a/COFF/InputFiles.cpp
+++ b/COFF/InputFiles.cpp
@@ -327,6 +327,9 @@ void ImportFile::parse() {
ImpSym = cast<DefinedImportData>(
Symtab->addImportData(ImpName, this)->body());
+ if (Hdr->getType() == llvm::COFF::IMPORT_CONST)
+ ConstSym =
+ cast<DefinedImportData>(Symtab->addImportData(Name, this)->body());
// If type is function, we need to create a thunk which jump to an
// address pointed by the __imp_ symbol. (This allows you to call