summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Pragma.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
-rw-r--r--clang/lib/Lex/Pragma.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index 654d4606a95..92332a00686 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -287,7 +287,10 @@ void Preprocessor::HandlePragmaDependency(Token &DependencyTok) {
// Reserve a buffer to get the spelling.
llvm::SmallString<128> FilenameBuffer;
- llvm::StringRef Filename = getSpelling(FilenameTok, FilenameBuffer);
+ bool Invalid = false;
+ llvm::StringRef Filename = getSpelling(FilenameTok, FilenameBuffer, &Invalid);
+ if (Invalid)
+ return;
bool isAngled =
GetIncludeFilenameSpelling(FilenameTok.getLocation(), Filename);
OpenPOWER on IntegriCloud