diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2023-03-23 14:41:03 +0100 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2023-03-23 14:41:03 +0100 |
commit | 8c7c1f11ffaacf762e612c65440fd2cbb58ee426 (patch) | |
tree | cebeb2cdd5c2a85cbeee81402baaba97e3074bda /clang/lib/Lex/ModuleMap.cpp | |
parent | 320969f5058bfffd6517c36771b46ac4a447c7ee (diff) | |
download | llvm-8c7c1f11ffaacf762e612c65440fd2cbb58ee426.zip llvm-8c7c1f11ffaacf762e612c65440fd2cbb58ee426.tar.gz llvm-8c7c1f11ffaacf762e612c65440fd2cbb58ee426.tar.bz2 |
Silence unused variable warning in NDEBUG builds
I usually would fold this into the assert, but the comment there
suggests side effects. NFC.
ModuleMap.cpp:938:9: error: unused variable 'MainFile' [-Werror,-Wunused-variable]
auto *MainFile = SourceMgr.getFileEntryForID(SourceMgr.getMainFileID());
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r-- | clang/lib/Lex/ModuleMap.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index f2b2d0b..44c8723 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -936,6 +936,7 @@ Module *ModuleMap::createModuleForImplementationUnit(SourceLocation Loc, // Mark the main source file as being within the newly-created module so that // declarations and macros are properly visibility-restricted to it. auto *MainFile = SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()); + (void)MainFile; assert(MainFile && "no input file for module implementation"); return Result; |