[llvm] 4092742 - [PDB] Switch from LLVM_PACKED to LLVM_PACKED_START/END

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 14:27:04 PDT 2020


Author: Reid Kleckner
Date: 2020-05-13T14:24:11-07:00
New Revision: 40927427406da6aa021ab80acf5f9944d762fbfd

URL: https://github.com/llvm/llvm-project/commit/40927427406da6aa021ab80acf5f9944d762fbfd
DIFF: https://github.com/llvm/llvm-project/commit/40927427406da6aa021ab80acf5f9944d762fbfd.diff

LOG: [PDB] Switch from LLVM_PACKED to LLVM_PACKED_START/END

Reportedly using the pragma instead of the __attribute__ silences
warnings with some GCC versions.

Added: 
    

Modified: 
    llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
index dc06a8022f0e..998ba1518b4f 100644
--- a/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
@@ -90,12 +90,14 @@ void GSIHashStreamBuilder::addSymbol(const codeview::CVSymbol &Symbol) {
 }
 
 namespace {
-LLVM_PACKED(struct PublicSym32Layout {
+LLVM_PACKED_START
+struct PublicSym32Layout {
   RecordPrefix Prefix;
   PublicSym32Header Pub;
   // char Name[];
-});
-}
+};
+LLVM_PACKED_END
+} // namespace
 
 // Calculate how much memory this public needs when serialized.
 static uint32_t sizeOfPublic(const BulkPublic &Pub) {


        


More information about the llvm-commits mailing list