[llvm] 546066e - Fix DIBuilder::createVariantPart after f6617d65e496

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 02:00:34 PST 2024


Author: Hans Wennborg
Date: 2024-11-08T10:50:36+01:00
New Revision: 546066e4f74d50c974248b0ed247f65ebf24b75c

URL: https://github.com/llvm/llvm-project/commit/546066e4f74d50c974248b0ed247f65ebf24b75c
DIFF: https://github.com/llvm/llvm-project/commit/546066e4f74d50c974248b0ed247f65ebf24b75c.diff

LOG: Fix DIBuilder::createVariantPart after f6617d65e496

which ended up passing 0 for the Discriminator arg, Discriminator for
the DataLocation arg, etc.

The DICompositeType::get's new NumExtraInhabitants parameter is at the
end, and has a default value, so no change in the caller is necessary.

See comment on https://github.com/llvm/llvm-project/pull/112590

Added: 
    

Modified: 
    llvm/lib/IR/DIBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 8bc8c2d81fb01a..665eda28c7d871 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -554,7 +554,7 @@ DIBuilder::createVariantPart(DIScope *Scope, StringRef Name, DIFile *File,
   auto *R = DICompositeType::get(
       VMContext, dwarf::DW_TAG_variant_part, Name, File, LineNumber,
       getNonCompileUnitScope(Scope), nullptr, SizeInBits, AlignInBits, 0, Flags,
-      Elements, 0, nullptr, nullptr, UniqueIdentifier, 0, Discriminator);
+      Elements, 0, nullptr, nullptr, UniqueIdentifier, Discriminator);
   trackIfUnresolved(R);
   return R;
 }


        


More information about the llvm-commits mailing list