summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-21 15:13:30 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-21 15:13:30 +0000
commit9a6b09874dab1247224f04d3dc5e9e900c9110a9 (patch)
treef870578396e39c1a4d958ff1adec70ab7f67f9d4 /clang/lib/Lex/PPDirectives.cpp
parentccbb77f2396eff2f782b3aab8fff1cc79a7c5cb6 (diff)
downloadbcm5719-llvm-9a6b09874dab1247224f04d3dc5e9e900c9110a9.tar.gz
bcm5719-llvm-9a6b09874dab1247224f04d3dc5e9e900c9110a9.zip
Make more use of llvm::StringRef in various APIs. In particular, don't
use the deprecated forms of llvm::StringMap::GetOrCreateValue(). llvm-svn: 133515
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 66e44bbc6dd..b6925b70b70 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -784,8 +784,7 @@ void Preprocessor::HandleLineDirective(Token &Tok) {
Diag(StrTok, diag::err_pp_linemarker_invalid_filename);
return DiscardUntilEndOfDirective();
}
- FilenameID = SourceMgr.getLineTableFilenameID(Literal.GetString(),
- Literal.GetStringLength());
+ FilenameID = SourceMgr.getLineTableFilenameID(Literal.GetString());
// Verify that there is nothing after the string, other than EOD. Because
// of C99 6.10.4p5, macros that expand to empty tokens are ok.
@@ -918,8 +917,7 @@ void Preprocessor::HandleDigitDirective(Token &DigitTok) {
Diag(StrTok, diag::err_pp_linemarker_invalid_filename);
return DiscardUntilEndOfDirective();
}
- FilenameID = SourceMgr.getLineTableFilenameID(Literal.GetString(),
- Literal.GetStringLength());
+ FilenameID = SourceMgr.getLineTableFilenameID(Literal.GetString());
// If a filename was present, read any flags that are present.
if (ReadLineMarkerFlags(IsFileEntry, IsFileExit,
OpenPOWER on IntegriCloud