[clang] 687304a - [clang][lex] Fix build failure after da95d926

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 8 10:28:54 PST 2024


Author: Jan Svoboda
Date: 2024-02-08T10:28:48-08:00
New Revision: 687304a018d36c4b0def4618a98fee6975172453

URL: https://github.com/llvm/llvm-project/commit/687304a018d36c4b0def4618a98fee6975172453
DIFF: https://github.com/llvm/llvm-project/commit/687304a018d36c4b0def4618a98fee6975172453.diff

LOG: [clang][lex] Fix build failure after da95d926

Added: 
    

Modified: 
    clang/lib/Lex/PPDirectives.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 97f9c0ada91de..0b22139ebe81d 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -2306,12 +2306,12 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(
 
     // Load the module to import its macros. We'll make the declarations
     // visible when the parser gets here.
-    // FIXME: Pass SM in here rather than converting it to a path and making the
-    // module loader convert it back again.
+    // FIXME: Pass ModuleToImport in here rather than converting it to a path
+    // and making the module loader convert it back again.
     ModuleLoadResult Imported = TheModuleLoader.loadModule(
         IncludeTok.getLocation(), Path, Module::Hidden,
         /*IsInclusionDirective=*/true);
-    assert((Imported == nullptr || Imported == SM) &&
+    assert((Imported == nullptr || Imported == ModuleToImport) &&
            "the imported module is 
diff erent than the suggested one");
 
     if (Imported) {
@@ -2526,7 +2526,7 @@ Preprocessor::ImportAction Preprocessor::HandleHeaderIncludeOrImport(
 
   case Import: {
     // If this is a module import, make it visible if needed.
-    assert(SM && "no module to import");
+    assert(ModuleToImport && "no module to import");
 
     makeModuleVisible(ModuleToImport, EndLoc);
 


        


More information about the cfe-commits mailing list