[llvm] 32e7d42 - [TableGen][GlobalISel] Fix warning when casting to `void *`

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 01:28:52 PDT 2023


Author: pvanhout
Date: 2023-07-24T10:28:39+02:00
New Revision: 32e7d42a5f8e3cb44bae7bbf71df67aee60747ed

URL: https://github.com/llvm/llvm-project/commit/32e7d42a5f8e3cb44bae7bbf71df67aee60747ed
DIFF: https://github.com/llvm/llvm-project/commit/32e7d42a5f8e3cb44bae7bbf71df67aee60747ed.diff

LOG: [TableGen][GlobalISel] Fix warning when casting to `void *`

Added: 
    

Modified: 
    llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp b/llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
index 5ed3d4bb98c16a..3ae66ed01b3ab1 100644
--- a/llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
+++ b/llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
@@ -677,10 +677,10 @@ void CombineRuleBuilder::verify() const {
       // string. They simply reference the std::string inside Pattern. Ensure
       // this is the case to avoid memory issues.
       if (Name.data() != Pat->getName().data()) {
-        dbgs() << "Map StringRef: '" << Name << "' @ " << (void *)Name.data()
-               << "\n";
+        dbgs() << "Map StringRef: '" << Name << "' @ "
+               << (const void *)Name.data() << "\n";
         dbgs() << "Pat String: '" << Pat->getName() << "' @ "
-               << (void *)Pat->getName().data() << "\n";
+               << (const void *)Pat->getName().data() << "\n";
         PrintFatalError("StringRef stored in the PatternMap is not referencing "
                         "the same string as its Pattern!");
       }


        


More information about the llvm-commits mailing list