diff options
author | Harlan Haskins <harlan@harlanhaskins.com> | 2019-08-01 21:31:56 +0000 |
---|---|---|
committer | Harlan Haskins <harlan@harlanhaskins.com> | 2019-08-01 21:31:56 +0000 |
commit | 8d323d150610bed1feeb79d7a29c9958a4c8bcac (patch) | |
tree | 166514f9a8bba05ea1504afab5c319975a57675d /clang/unittests/Lex/HeaderSearchTest.cpp | |
parent | 461f0722dd26487c1faa497ba37aabed1477a561 (diff) | |
download | bcm5719-llvm-8d323d150610bed1feeb79d7a29c9958a4c8bcac.tar.gz bcm5719-llvm-8d323d150610bed1feeb79d7a29c9958a4c8bcac.zip |
[clang] Adopt new FileManager error-returning APIs
Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods.
Signed-off-by: Harlan Haskins <harlan@apple.com>
llvm-svn: 367616
Diffstat (limited to 'clang/unittests/Lex/HeaderSearchTest.cpp')
-rw-r--r-- | clang/unittests/Lex/HeaderSearchTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Lex/HeaderSearchTest.cpp b/clang/unittests/Lex/HeaderSearchTest.cpp index 626cfadb15f..b013cac85fc 100644 --- a/clang/unittests/Lex/HeaderSearchTest.cpp +++ b/clang/unittests/Lex/HeaderSearchTest.cpp @@ -39,9 +39,9 @@ protected: void addSearchDir(llvm::StringRef Dir) { VFS->addFile(Dir, 0, llvm::MemoryBuffer::getMemBuffer(""), /*User=*/None, /*Group=*/None, llvm::sys::fs::file_type::directory_file); - const DirectoryEntry *DE = FileMgr.getDirectory(Dir); + auto DE = FileMgr.getDirectory(Dir); assert(DE); - auto DL = DirectoryLookup(DE, SrcMgr::C_User, /*isFramework=*/false); + auto DL = DirectoryLookup(*DE, SrcMgr::C_User, /*isFramework=*/false); Search.AddSearchPath(DL, /*isAngled=*/false); } |