[llvm] r222068 - DIBuilder: Change private helper function to static, NFC

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Nov 14 16:05:04 PST 2014


Author: dexonsmith
Date: Fri Nov 14 18:05:04 2014
New Revision: 222068

URL: http://llvm.org/viewvc/llvm-project?rev=222068&view=rev
Log:
DIBuilder: Change private helper function to static, NFC

Modified:
    llvm/trunk/include/llvm/IR/DIBuilder.h
    llvm/trunk/lib/IR/DIBuilder.cpp

Modified: llvm/trunk/include/llvm/IR/DIBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DIBuilder.h?rev=222068&r1=222067&r2=222068&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DIBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/DIBuilder.h Fri Nov 14 18:05:04 2014
@@ -75,13 +75,6 @@ namespace llvm {
     /// Each subprogram's preserved local variables.
     DenseMap<MDNode *, std::vector<TrackingVH<MDNode>>> PreservedVariables;
 
-    // Private use for multiple types of template parameters.
-    DITemplateValueParameter
-    createTemplateValueParameter(unsigned Tag, DIDescriptor Scope,
-                                 StringRef Name, DIType Ty, Value *Val,
-                                 MDNode *File = nullptr, unsigned LineNo = 0,
-                                 unsigned ColumnNo = 0);
-
     DIBuilder(const DIBuilder &) LLVM_DELETED_FUNCTION;
     void operator=(const DIBuilder &) LLVM_DELETED_FUNCTION;
 

Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=222068&r1=222067&r2=222068&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Fri Nov 14 18:05:04 2014
@@ -476,12 +476,9 @@ DIBuilder::createTemplateTypeParameter(D
   return DITemplateTypeParameter(MDNode::get(VMContext, Elts));
 }
 
-DITemplateValueParameter
-DIBuilder::createTemplateValueParameter(unsigned Tag, DIDescriptor Context,
-                                        StringRef Name, DIType Ty,
-                                        Value *Val, MDNode *File,
-                                        unsigned LineNo,
-                                        unsigned ColumnNo) {
+static DITemplateValueParameter createTemplateValueParameterHelper(
+    LLVMContext &VMContext, unsigned Tag, DIDescriptor Context, StringRef Name,
+    DIType Ty, Value *Val, MDNode *File, unsigned LineNo, unsigned ColumnNo) {
   Value *Elts[] = {
       HeaderBuilder::get(Tag).concat(Name).concat(LineNo).concat(ColumnNo).get(
           VMContext),
@@ -495,9 +492,9 @@ DIBuilder::createTemplateValueParameter(
                                         DIType Ty, Value *Val,
                                         MDNode *File, unsigned LineNo,
                                         unsigned ColumnNo) {
-  return createTemplateValueParameter(dwarf::DW_TAG_template_value_parameter,
-                                      Context, Name, Ty, Val, File, LineNo,
-                                      ColumnNo);
+  return createTemplateValueParameterHelper(
+      VMContext, dwarf::DW_TAG_template_value_parameter, Context, Name, Ty, Val,
+      File, LineNo, ColumnNo);
 }
 
 DITemplateValueParameter
@@ -505,8 +502,8 @@ DIBuilder::createTemplateTemplateParamet
                                            DIType Ty, StringRef Val,
                                            MDNode *File, unsigned LineNo,
                                            unsigned ColumnNo) {
-  return createTemplateValueParameter(
-      dwarf::DW_TAG_GNU_template_template_param, Context, Name, Ty,
+  return createTemplateValueParameterHelper(
+      VMContext, dwarf::DW_TAG_GNU_template_template_param, Context, Name, Ty,
       MDString::get(VMContext, Val), File, LineNo, ColumnNo);
 }
 
@@ -515,9 +512,9 @@ DIBuilder::createTemplateParameterPack(D
                                        DIType Ty, DIArray Val,
                                        MDNode *File, unsigned LineNo,
                                        unsigned ColumnNo) {
-  return createTemplateValueParameter(dwarf::DW_TAG_GNU_template_parameter_pack,
-                                      Context, Name, Ty, Val, File, LineNo,
-                                      ColumnNo);
+  return createTemplateValueParameterHelper(
+      VMContext, dwarf::DW_TAG_GNU_template_parameter_pack, Context, Name, Ty,
+      Val, File, LineNo, ColumnNo);
 }
 
 DICompositeType DIBuilder::createClassType(DIDescriptor Context, StringRef Name,





More information about the llvm-commits mailing list