aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-12-02 01:47:07 +0000
committerDouglas Gregor <dgregor@apple.com>2011-12-02 01:47:07 +0000
commit2b82c2a59ecac139e6d1339cec3da1665d1fe592 (patch)
treeaee07692f6900a130b53f2bb7b32dd597d34e277 /clang/lib/Lex/Preprocessor.cpp
parent4e3a11ba57b71f9a4356048708c8389020eb1afa (diff)
downloadllvm-2b82c2a59ecac139e6d1339cec3da1665d1fe592.zip
llvm-2b82c2a59ecac139e6d1339cec3da1665d1fe592.tar.gz
llvm-2b82c2a59ecac139e6d1339cec3da1665d1fe592.tar.bz2
Implementing parsing and resolution of module export declarations
within module maps, which will (eventually) be used to re-export a module from another module. There are still some pieces missing, however. llvm-svn: 145665
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 180e1e2..6cf34e2 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -369,7 +369,12 @@ void Preprocessor::CreateString(const char *Buf, unsigned Len, Token &Tok,
Tok.setLiteralData(DestPtr);
}
-
+Module *Preprocessor::getCurrentModule() {
+ if (getLangOptions().CurrentModule.empty())
+ return 0;
+
+ return getHeaderSearchInfo().getModule(getLangOptions().CurrentModule);
+}
//===----------------------------------------------------------------------===//
// Preprocessor Initialization Methods