llvm.org GIT mirror llvm / 4e036ff
Fix some Clang-tidy modernize warnings, other minor fixes. Fixed warnings are: modernize-use-override, modernize-use-nullptr and modernize-redundant-void-arg. Differential revision: http://reviews.llvm.org/D14312 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252087 91177308-0d34-0410-b5e6-96231b3b80d8 Eugene Zelenko 3 years ago
17 changed file(s) with 86 addition(s) and 93 deletion(s). Raw diff Collapse all Expand all
1010 // sample profile data.
1111 //
1212 //===----------------------------------------------------------------------===//
13
1314 #ifndef LLVM_PROFILEDATA_SAMPLEPROF_H_
1415 #define LLVM_PROFILEDATA_SAMPLEPROF_H_
1516
244245 findFunctionSamplesAt(const CallsiteLocation &Loc) const {
245246 auto iter = CallsiteSamples.find(Loc);
246247 if (iter == CallsiteSamples.end()) {
247 return NULL;
248 return nullptr;
248249 } else {
249250 return &iter->second;
250251 }
321322 CallsiteSampleMap CallsiteSamples;
322323 };
323324
324 } // End namespace sampleprof
325
326 } // End namespace llvm
325 } // end namespace sampleprof
326
327 } // end namespace llvm
327328
328329 #endif // LLVM_PROFILEDATA_SAMPLEPROF_H_
255255 LLVMCleanupPad = 65,
256256 LLVMCatchEndPad = 66,
257257 LLVMCleanupEndPad = 67
258
259258 } LLVMOpcode;
260259
261260 typedef enum {
435434 @see ManagedStatic */
436435 void LLVMShutdown(void);
437436
438
439437 /*===-- Error handling ----------------------------------------------------===*/
440438
441439 char *LLVMCreateMessage(const char *Message);
815813 LLVMTypeRef LLVMInt16TypeInContext(LLVMContextRef C);
816814 LLVMTypeRef LLVMInt32TypeInContext(LLVMContextRef C);
817815 LLVMTypeRef LLVMInt64TypeInContext(LLVMContextRef C);
816 LLVMTypeRef LLVMInt128TypeInContext(LLVMContextRef C);
818817 LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits);
819818
820819 /**
826825 LLVMTypeRef LLVMInt16Type(void);
827826 LLVMTypeRef LLVMInt32Type(void);
828827 LLVMTypeRef LLVMInt64Type(void);
828 LLVMTypeRef LLVMInt128Type(void);
829829 LLVMTypeRef LLVMIntType(unsigned NumBits);
830830 unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy);
831831
10281028 /**
10291029 * @}
10301030 */
1031
10321031
10331032 /**
10341033 * @defgroup LLVMCCoreTypeSequential Sequential Types
12101209 macro(InsertElementInst) \
12111210 macro(InsertValueInst) \
12121211 macro(LandingPadInst) \
1213 macro(CleanupPadInst) \
1212 macro(CleanupPadInst) \
12141213 macro(PHINode) \
12151214 macro(SelectInst) \
12161215 macro(ShuffleVectorInst) \
12251224 macro(ResumeInst) \
12261225 macro(CleanupReturnInst) \
12271226 macro(CatchReturnInst) \
1228 macro(CatchPadInst) \
1229 macro(TerminatePadInst) \
1230 macro(CatchEndPadInst) \
1227 macro(CatchPadInst) \
1228 macro(TerminatePadInst) \
1229 macro(CatchEndPadInst) \
12311230 macro(CleanupEndPadInst) \
12321231 macro(UnaryInstruction) \
12331232 macro(AllocaInst) \
30363035
30373036 #ifdef __cplusplus
30383037 }
3039 #endif /* !defined(__cplusplus) */
3040
3041 #endif /* !defined(LLVM_C_CORE_H) */
3038 #endif
3039
3040 #endif /* LLVM_C_CORE_H */
4040 DIEs.Values.push_back(new (Allocator) HashDataContents(die, Flags));
4141 }
4242
43 void DwarfAccelTable::ComputeBucketCount(void) {
43 void DwarfAccelTable::ComputeBucketCount() {
4444 // First get the number of unique hashes.
4545 std::vector uniques(Data.size());
4646 for (size_t i = 0, e = Data.size(); i < e; ++i)
None //===- lib/MC/MCAsmStreamer.cpp - Text Assembly Output --------------------===//
0 //===- lib/MC/MCAsmStreamer.cpp - Text Assembly Output ----------*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
3232 #include "llvm/Support/MathExtras.h"
3333 #include "llvm/Support/Path.h"
3434 #include
35
3536 using namespace llvm;
3637
3738 namespace {
654655 OS << '"';
655656 }
656657
657
658658 void MCAsmStreamer::EmitBytes(StringRef Data) {
659659 assert(getCurrentSection().first &&
660660 "Cannot emit contents before setting section!");
776776 EmitEOL();
777777 }
778778
779
780779 /// EmitFill - Emit NumBytes bytes worth of the value specified by
781780 /// FillValue. This implements directives such as '.space'.
782781 void MCAsmStreamer::EmitFill(uint64_t NumBytes, uint8_t FillValue) {
866865 return false;
867866 }
868867
869
870868 void MCAsmStreamer::EmitFileDirective(StringRef Filename) {
871869 assert(MAI->hasSingleParameterDotFile());
872870 OS << "\t.file\t";
12291227 EmitEOL();
12301228 }
12311229
1232 void MCAsmStreamer::EmitWinCFIEndProlog(void) {
1230 void MCAsmStreamer::EmitWinCFIEndProlog() {
12331231 MCStreamer::EmitWinCFIEndProlog();
12341232
12351233 OS << "\t.seh_endprologue";
1414 #include "llvm/Config/config.h"
1515
1616 namespace llvm {
17
1718 using namespace sys;
1819
1920 const TimeValue::SecondsType
2122 const TimeValue::SecondsType
2223 TimeValue::Win32ZeroTimeSeconds = -12591158400ULL;
2324
24 void
25 TimeValue::normalize( void ) {
25 void TimeValue::normalize() {
2626 if ( nanos_ >= NANOSECONDS_PER_SECOND ) {
2727 do {
2828 seconds_++;
4444 }
4545 }
4646
47 }
47 } // namespace llvm
4848
4949 /// Include the platform-specific portion of TimeValue class
5050 #ifdef LLVM_ON_UNIX
None //===- InstCombineAddSub.cpp ----------------------------------------------===//
0 //===- InstCombineAddSub.cpp ------------------------------------*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
1616 #include "llvm/IR/DataLayout.h"
1717 #include "llvm/IR/GetElementPtrTypeIterator.h"
1818 #include "llvm/IR/PatternMatch.h"
19
1920 using namespace llvm;
2021 using namespace PatternMatch;
2122
6667
6768 private:
6869 bool insaneIntVal(int V) { return V > 4 || V < -4; }
69 APFloat *getFpValPtr(void)
70 APFloat *getFpValPtr()
7071 { return reinterpret_cast(&FpValBuf.buffer[0]); }
71 const APFloat *getFpValPtr(void) const
72 const APFloat *getFpValPtr() const
7273 { return reinterpret_cast(&FpValBuf.buffer[0]); }
7374
74 const APFloat &getFpVal(void) const {
75 const APFloat &getFpVal() const {
7576 assert(IsFp && BufHasFpVal && "Incorret state");
7677 return *getFpValPtr();
7778 }
7879
79 APFloat &getFpVal(void) {
80 APFloat &getFpVal() {
8081 assert(IsFp && BufHasFpVal && "Incorret state");
8182 return *getFpValPtr();
8283 }
9192 // TODO: We should get rid of this function when APFloat can be constructed
9293 // from an *SIGNED* integer.
9394 APFloat createAPFloatFromInt(const fltSemantics &Sem, int Val);
95
9496 private:
95
9697 bool IsFp;
9798
9899 // True iff FpValBuf contains an instance of APFloat.
113114 ///
114115 class FAddend {
115116 public:
116 FAddend() { Val = nullptr; }
117
118 Value *getSymVal (void) const { return Val; }
119 const FAddendCoef &getCoef(void) const { return Coeff; }
117 FAddend() : Val(nullptr) {}
118
119 Value *getSymVal() const { return Val; }
120 const FAddendCoef &getCoef() const { return Coeff; }
120121
121122 bool isConstant() const { return Val == nullptr; }
122123 bool isZero() const { return Coeff.isZero(); }
181182 InstCombiner::BuilderTy *Builder;
182183 Instruction *Instr;
183184
184 private:
185185 // Debugging stuff are clustered here.
186186 #ifndef NDEBUG
187187 unsigned CreateInstrNum;
192192 void incCreateInstNum() {}
193193 #endif
194194 };
195 }
195
196 } // anonymous namespace
196197
197198 //===----------------------------------------------------------------------===//
198199 //
601602 }
602603
603604 Value *FAddCombine::simplifyFAdd(AddendVect& Addends, unsigned InstrQuota) {
604
605605 unsigned AddendNum = Addends.size();
606606 assert(AddendNum <= 4 && "Too many addends");
607607
14201420 return Changed ? &I : nullptr;
14211421 }
14221422
1423
14241423 /// Optimize pointer differences into the same array into a size. Consider:
14251424 /// &A[10] - &A[0]: we should compile this to "10". LHS/RHS are the pointer
14261425 /// operands to the ptrtoint instructions for the LHS/RHS of the subtract.
15881587 }
15891588 }
15901589
1591
15921590 {
15931591 Value *Y;
15941592 // X-(X+Y) == -Y X-(Y+X) == -Y
260260 // We use the initial-exec TLS model because we do not support the
261261 // variable living anywhere other than in the main executable.
262262 UnsafeStackPtr = new GlobalVariable(
263 M, StackPtrTy, false, GlobalValue::ExternalLinkage, 0,
263 M, StackPtrTy, false, GlobalValue::ExternalLinkage, nullptr,
264264 UnsafeStackPtrVar, nullptr, GlobalValue::InitialExecTLSModel);
265265 } else {
266266 // The variable exists, check its type and attributes.
107107
108108 public:
109109 static char ID; // Pass identification, replacement for typeid
110 explicit MergedLoadStoreMotion(void)
110 MergedLoadStoreMotion()
111111 : FunctionPass(ID), MD(nullptr), MagicCompileTimeControl(250) {
112112 initializeMergedLoadStoreMotionPass(*PassRegistry::getPassRegistry());
113113 }
158158 };
159159
160160 char MergedLoadStoreMotion::ID = 0;
161 }
161 } // anonymous namespace
162162
163163 ///
164164 /// \brief createMergedLoadStoreMotionPass - The public interface to this file.
None //===- RemoteTarget.cpp - LLVM Remote process JIT execution --------------===//
0 //===- RemoteTarget.cpp - LLVM Remote process JIT execution -----*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
5555 }
5656
5757 bool RemoteTarget::executeCode(uint64_t Address, int &RetVal) {
58 int (*fn)(void) = (int(*)(void))Address;
58 int (*fn)() = (int(*)())Address;
5959 RetVal = fn();
6060 return true;
6161 }
None //===-- llvm-mc.cpp - Machine Code Hacking Driver -------------------------===//
0 //===-- llvm-mc.cpp - Machine Code Hacking Driver ---------------*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
3838 #include "llvm/Support/TargetRegistry.h"
3939 #include "llvm/Support/TargetSelect.h"
4040 #include "llvm/Support/ToolOutputFile.h"
41
4142 using namespace llvm;
4243
4344 static cl::opt
233234 }
234235
235236 static std::string DwarfDebugProducer;
236 static void setDwarfDebugProducer(void) {
237 static void setDwarfDebugProducer() {
237238 if(!getenv("DEBUG_PRODUCER"))
238239 return;
239240 DwarfDebugProducer += getenv("DEBUG_PRODUCER");
None //===-- llvm-size.cpp - Print the size of each object section -------------===//
0 //===-- llvm-size.cpp - Print the size of each object section ---*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
2929 #include
3030 #include
3131 #include
32
3233 using namespace llvm;
3334 using namespace object;
3435
9798 }
9899
99100 /// @brief Return the printing format for the Radix.
100 static const char *getRadixFmt(void) {
101 static const char *getRadixFmt() {
101102 switch (Radix) {
102103 case octal:
103104 return PRIo64;
None //===- MCJITMultipeModuleTest.cpp - Unit tests for the MCJIT-----*- C++ -*-===//
0 //===- MCJITMultipeModuleTest.cpp - Unit tests for the MCJIT ----*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
227227 uint64_t FBPtr = TheJIT->getFunctionAddress(FB->getName().str());
228228 TheJIT->finalizeObject();
229229 EXPECT_TRUE(0 != FBPtr);
230 int32_t(*FuncPtr)(void) = (int32_t(*)(void))FBPtr;
230 int32_t(*FuncPtr)() = (int32_t(*)())FBPtr;
231231 EXPECT_EQ(initialNum, FuncPtr())
232232 << "Invalid value for global returned from JITted function in module B";
233233
234234 uint64_t FAPtr = TheJIT->getFunctionAddress(FA->getName().str());
235235 EXPECT_TRUE(0 != FAPtr);
236 FuncPtr = (int32_t(*)(void))FAPtr;
236 FuncPtr = (int32_t(*)())FAPtr;
237237 EXPECT_EQ(initialNum, FuncPtr())
238238 << "Invalid value for global returned from JITted function in module A";
239239 }
7777
7878 class MCJITObjectCacheTest : public testing::Test, public MCJITTestBase {
7979 protected:
80
8180 enum {
8281 OriginalRC = 6,
8382 ReplacementRC = 7
10099 EXPECT_TRUE(nullptr != vPtr)
101100 << "Unable to get pointer to main() from JIT";
102101
103 int (*FuncPtr)(void) = (int(*)(void))(intptr_t)vPtr;
102 int (*FuncPtr)() = (int(*)())(intptr_t)vPtr;
104103 int returnCode = FuncPtr();
105104 EXPECT_EQ(returnCode, ExpectedRC);
106105 }
117116
118117 compileAndRun();
119118 }
120
121119
122120 TEST_F(MCJITObjectCacheTest, VerifyBasicObjectCaching) {
123121 SKIP_UNSUPPORTED_PLATFORM;
227225 EXPECT_FALSE(Cache->wereDuplicatesInserted());
228226 }
229227
230 } // Namespace
231
228 } // end anonymous namespace
8888 EXPECT_TRUE(0 != ptr)
8989 << "Unable to get pointer to main() from JIT";
9090
91 int (*FuncPtr)(void) = (int(*)(void))ptr;
91 int (*FuncPtr)() = (int(*)())ptr;
9292 int returnCode = FuncPtr();
9393 EXPECT_EQ(returnCode, rc);
9494 }
108108 uint64_t rgvPtr = TheJIT->getFunctionAddress(ReturnGlobal->getName().str());
109109 EXPECT_TRUE(0 != rgvPtr);
110110
111 int32_t(*FuncPtr)(void) = (int32_t(*)(void))rgvPtr;
111 int32_t(*FuncPtr)() = (int32_t(*)())rgvPtr;
112112 EXPECT_EQ(initialNum, FuncPtr())
113113 << "Invalid value for global returned from JITted function";
114114 }
180180 EXPECT_TRUE(0 != ptr)
181181 << "Unable to get pointer to outer function from JIT";
182182
183 int32_t(*FuncPtr)(void) = (int32_t(*)(void))ptr;
183 int32_t(*FuncPtr)() = (int32_t(*)())ptr;
184184 EXPECT_EQ(innerRetVal, FuncPtr())
185185 << "Incorrect result returned from function";
186186 }
2222
2323 class OrcCAPIExecutionTest : public testing::Test, public OrcExecutionTest {
2424 protected:
25
2625 std::unique_ptr createTestModule(const Triple &TT) {
2726 ModuleBuilder MB(getGlobalContext(), TT.str(), "");
2827 Function *TestFunc = MB.createFunctionDecl("testFunc");
3635 return MB.takeModule();
3736 }
3837
39 typedef int (*MainFnTy)(void);
38 typedef int (*MainFnTy)();
4039
41 static int myTestFuncImpl(void) {
40 static int myTestFuncImpl() {
4241 return 42;
4342 }
4443
6564 auto *ET = CCtx->APIExecTest;
6665 CCtx->M = ET->createTestModule(ET->TM->getTargetTriple());
6766 CCtx->H = LLVMOrcAddEagerlyCompiledIR(JITStack, wrap(CCtx->M.get()),
68 myResolver, 0);
67 myResolver, nullptr);
6968 CCtx->Compiled = true;
7069 LLVMOrcTargetAddress MainAddr = LLVMOrcGetSymbolAddress(JITStack, "main");
7170 LLVMOrcSetIndirectStubPointer(JITStack, "foo", MainAddr);
7271 return MainAddr;
7372 }
74
7573 };
7674
77 char *OrcCAPIExecutionTest::testFuncName = 0;
75 char *OrcCAPIExecutionTest::testFuncName = nullptr;
7876
7977 TEST_F(OrcCAPIExecutionTest, TestEagerIRCompilation) {
8078 if (!TM)
8886 LLVMOrcGetMangledSymbol(JIT, &testFuncName, "testFunc");
8987
9088 LLVMOrcModuleHandle H =
91 LLVMOrcAddEagerlyCompiledIR(JIT, wrap(M.get()), myResolver, 0);
89 LLVMOrcAddEagerlyCompiledIR(JIT, wrap(M.get()), myResolver, nullptr);
9290 MainFnTy MainFn = (MainFnTy)LLVMOrcGetSymbolAddress(JIT, "main");
9391 int Result = MainFn();
9492 EXPECT_EQ(Result, 42)
112110 LLVMOrcGetMangledSymbol(JIT, &testFuncName, "testFunc");
113111
114112 LLVMOrcModuleHandle H =
115 LLVMOrcAddLazilyCompiledIR(JIT, wrap(M.get()), myResolver, 0);
113 LLVMOrcAddLazilyCompiledIR(JIT, wrap(M.get()), myResolver, nullptr);
116114 MainFnTy MainFn = (MainFnTy)LLVMOrcGetSymbolAddress(JIT, "main");
117115 int Result = MainFn();
118116 EXPECT_EQ(Result, 42)
157155 LLVMOrcDisposeInstance(JIT);
158156 }
159157
160 }
158 } // namespace llvm
None //===- unittest/ProfileData/InstrProfTest.cpp -------------------------------=//
0 //===- unittest/ProfileData/InstrProfTest.cpp -------------------*- C++ -*-===//
11 //
22 // The LLVM Compiler Infrastructure
33 //
131131 InstrProfValueData VD0[] = {{(uint64_t) "callee1", 1},
132132 {(uint64_t) "callee2", 2},
133133 {(uint64_t) "callee3", 3}};
134 Record1.addValueData(IPVK_IndirectCallTarget, 0, VD0, 3, 0);
134 Record1.addValueData(IPVK_IndirectCallTarget, 0, VD0, 3, nullptr);
135135 // No valeu profile data at the second site.
136 Record1.addValueData(IPVK_IndirectCallTarget, 1, 0, 0, 0);
136 Record1.addValueData(IPVK_IndirectCallTarget, 1, nullptr, 0, nullptr);
137137 InstrProfValueData VD2[] = {{(uint64_t) "callee1", 1},
138138 {(uint64_t) "callee2", 2}};
139 Record1.addValueData(IPVK_IndirectCallTarget, 2, VD2, 2, 0);
139 Record1.addValueData(IPVK_IndirectCallTarget, 2, VD2, 2, nullptr);
140140 InstrProfValueData VD3[] = {{(uint64_t) "callee1", 1}};
141 Record1.addValueData(IPVK_IndirectCallTarget, 3, VD3, 1, 0);
141 Record1.addValueData(IPVK_IndirectCallTarget, 3, VD3, 1, nullptr);
142142
143143 Writer.addRecord(std::move(Record1));
144144 Writer.addRecord(std::move(Record2));
182182 {(uint64_t) "callee2", 2},
183183 {(uint64_t) "callee3", 3},
184184 {(uint64_t) "callee4", 4}};
185 Record11.addValueData(IPVK_IndirectCallTarget, 0, VD0, 4, 0);
185 Record11.addValueData(IPVK_IndirectCallTarget, 0, VD0, 4, nullptr);
186186
187187 // No valeu profile data at the second site.
188 Record11.addValueData(IPVK_IndirectCallTarget, 1, 0, 0, 0);
188 Record11.addValueData(IPVK_IndirectCallTarget, 1, nullptr, 0, nullptr);
189189
190190 InstrProfValueData VD2[] = {{(uint64_t) "callee1", 1},
191191 {(uint64_t) "callee2", 2},
192192 {(uint64_t) "callee3", 3}};
193 Record11.addValueData(IPVK_IndirectCallTarget, 2, VD2, 3, 0);
193 Record11.addValueData(IPVK_IndirectCallTarget, 2, VD2, 3, nullptr);
194194
195195 InstrProfValueData VD3[] = {{(uint64_t) "callee1", 1}};
196 Record11.addValueData(IPVK_IndirectCallTarget, 3, VD3, 1, 0);
196 Record11.addValueData(IPVK_IndirectCallTarget, 3, VD3, 1, nullptr);
197197
198198 InstrProfValueData VD4[] = {{(uint64_t) "callee1", 1},
199199 {(uint64_t) "callee2", 2},
200200 {(uint64_t) "callee3", 3}};
201 Record11.addValueData(IPVK_IndirectCallTarget, 4, VD4, 3, 0);
201 Record11.addValueData(IPVK_IndirectCallTarget, 4, VD4, 3, nullptr);
202202
203203 // A differnt record for the same caller.
204204 Record12.reserveSites(IPVK_IndirectCallTarget, 5);
205205 InstrProfValueData VD02[] = {{(uint64_t) "callee2", 5},
206206 {(uint64_t) "callee3", 3}};
207 Record12.addValueData(IPVK_IndirectCallTarget, 0, VD02, 2, 0);
207 Record12.addValueData(IPVK_IndirectCallTarget, 0, VD02, 2, nullptr);
208208
209209 // No valeu profile data at the second site.
210 Record12.addValueData(IPVK_IndirectCallTarget, 1, 0, 0, 0);
210 Record12.addValueData(IPVK_IndirectCallTarget, 1, nullptr, 0, nullptr);
211211
212212 InstrProfValueData VD22[] = {{(uint64_t) "callee2", 1},
213213 {(uint64_t) "callee3", 3},
214214 {(uint64_t) "callee4", 4}};
215 Record12.addValueData(IPVK_IndirectCallTarget, 2, VD22, 3, 0);
216
217 Record12.addValueData(IPVK_IndirectCallTarget, 3, 0, 0, 0);
215 Record12.addValueData(IPVK_IndirectCallTarget, 2, VD22, 3, nullptr);
216
217 Record12.addValueData(IPVK_IndirectCallTarget, 3, nullptr, 0, nullptr);
218218
219219 InstrProfValueData VD42[] = {{(uint64_t) "callee1", 1},
220220 {(uint64_t) "callee2", 2},
221221 {(uint64_t) "callee3", 3}};
222 Record12.addValueData(IPVK_IndirectCallTarget, 4, VD42, 3, 0);
222 Record12.addValueData(IPVK_IndirectCallTarget, 4, VD42, 3, nullptr);
223223
224224 Writer.addRecord(std::move(Record11));
225225 // Merge profile data.
148148 PE = I->first.end(); PI != PE; ++PI) {
149149 OS << "\"" << *PI << "\" COMMA ";
150150 }
151 OS << "0})\n";
151 OS << "nullptr})\n";
152152 }
153153 OS << "#undef COMMA\n";
154 OS << "#endif\n\n";
154 OS << "#endif // PREFIX\n\n";
155155
156156 OS << "/////////\n";
157157 OS << "// Groups\n\n";
163163 OS << "OPTION(";
164164
165165 // The option prefix;
166 OS << "0";
166 OS << "nullptr";
167167
168168 // The option string.
169169 OS << ", \"" << R.getValueAsString("Name") << '"';
182182 OS << "INVALID";
183183
184184 // The other option arguments (unused for groups).
185 OS << ", INVALID, 0, 0, 0";
185 OS << ", INVALID, nullptr, 0, 0";
186186
187187 // The option help text.
188188 if (!isa(R.getValueInit("HelpText"))) {
190190 OS << " ";
191191 write_cstring(OS, R.getValueAsString("HelpText"));
192192 } else
193 OS << ", 0";
193 OS << ", nullptr";
194194
195195 // The option meta-variable name (unused).
196 OS << ", 0)\n";
196 OS << ", nullptr)\n";
197197 }
198198 OS << "\n";
199199
241241 OS << ", ";
242242 std::vector AliasArgs = R.getValueAsListOfStrings("AliasArgs");
243243 if (AliasArgs.size() == 0) {
244 OS << "0";
244 OS << "nullptr";
245245 } else {
246246 OS << "\"";
247247 for (size_t i = 0, e = AliasArgs.size(); i != e; ++i)
273273 OS << " ";
274274 write_cstring(OS, R.getValueAsString("HelpText"));
275275 } else
276 OS << ", 0";
276 OS << ", nullptr";
277277
278278 // The option meta-variable name.
279279 OS << ", ";
280280 if (!isa(R.getValueInit("MetaVarName")))
281281 write_cstring(OS, R.getValueAsString("MetaVarName"));
282282 else
283 OS << "0";
283 OS << "nullptr";
284284
285285 OS << ")\n";
286286 }
287 OS << "#endif\n";
287 OS << "#endif // OPTION\n";
288288 }
289289 } // end namespace llvm