diff options
| author | Mingming Liu <mingmingl@google.com> | 2025-09-10 15:25:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-10 15:25:31 -0700 |
| commit | 1417dafa1db9cb1b2b09438aa9f53ea5ab6e36e2 (patch) | |
| tree | 57f4b1f313c8cf74eed8819870f39c36ea263c68 /llvm/examples | |
| parent | 898b813bc8a6d0276bf0f4769f5f2f64b34e632d (diff) | |
| parent | b8cefcb601ddaa18482555c4ff363c01a270c2fe (diff) | |
Merge branch 'main' into users/mingmingl-llvm/samplefdo-profile-formatusers/mingmingl-llvm/samplefdo-profile-format
Diffstat (limited to 'llvm/examples')
9 files changed, 17 insertions, 14 deletions
diff --git a/llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp b/llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp index ed1262b59064..dd2e8d2ca941 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp +++ b/llvm/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp @@ -564,7 +564,7 @@ static PrototypeAST *ParsePrototype() { // Read the precedence if present. if (CurTok == tok_number) { if (NumVal < 1 || NumVal > 100) - return ErrorP("Invalid precedecnce: must be 1..100"); + return ErrorP("Invalid precedence: must be 1..100"); BinaryPrecedence = (unsigned)NumVal; getNextToken(); } @@ -670,7 +670,7 @@ Value *BinaryExprAST::Codegen() { if (Op == '=') { // Assignment requires the LHS to be an identifier. // For now, I'm building without RTTI because LLVM builds that way by - // default and so we need to build that way to use the command line supprt. + // default and so we need to build that way to use the command line support. // If you build LLVM with RTTI this can be changed back to a dynamic_cast. VariableExprAST *LHSE = static_cast<VariableExprAST*>(LHS); if (!LHSE) diff --git a/llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp b/llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp index b4b7eac8a883..629756e95deb 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp +++ b/llvm/examples/Kaleidoscope/MCJIT/cached/toy.cpp @@ -571,7 +571,7 @@ static PrototypeAST *ParsePrototype() { // Read the precedence if present. if (CurTok == tok_number) { if (NumVal < 1 || NumVal > 100) - return ErrorP("Invalid precedecnce: must be 1..100"); + return ErrorP("Invalid precedence: must be 1..100"); BinaryPrecedence = (unsigned)NumVal; getNextToken(); } @@ -647,7 +647,7 @@ std::string MakeLegalFunctionName(std::string Name) // Start with what we have NewName = Name; - // Look for a numberic first character + // Look for a numeric first character if (NewName.find_first_of("0123456789") == 0) { NewName.insert(0, 1, 'n'); } diff --git a/llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp b/llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp index bc2267fe1829..8f1fc1c6aaf9 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp +++ b/llvm/examples/Kaleidoscope/MCJIT/complete/toy.cpp @@ -590,7 +590,7 @@ static PrototypeAST *ParsePrototype() { // Read the precedence if present. if (CurTok == tok_number) { if (NumVal < 1 || NumVal > 100) - return ErrorP("Invalid precedecnce: must be 1..100"); + return ErrorP("Invalid precedence: must be 1..100"); BinaryPrecedence = (unsigned)NumVal; getNextToken(); } @@ -666,7 +666,7 @@ std::string MakeLegalFunctionName(std::string Name) // Start with what we have NewName = Name; - // Look for a numberic first character + // Look for a numeric first character if (NewName.find_first_of("0123456789") == 0) { NewName.insert(0, 1, 'n'); } diff --git a/llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp b/llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp index 16535057ed9e..6e4de6d2cb74 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp +++ b/llvm/examples/Kaleidoscope/MCJIT/initial/toy.cpp @@ -548,7 +548,7 @@ static PrototypeAST *ParsePrototype() { // Read the precedence if present. if (CurTok == tok_number) { if (NumVal < 1 || NumVal > 100) - return ErrorP("Invalid precedecnce: must be 1..100"); + return ErrorP("Invalid precedence: must be 1..100"); BinaryPrecedence = (unsigned)NumVal; getNextToken(); } @@ -624,7 +624,7 @@ std::string MakeLegalFunctionName(std::string Name) // Start with what we have NewName = Name; - // Look for a numberic first character + // Look for a numeric first character if (NewName.find_first_of("0123456789") == 0) { NewName.insert(0, 1, 'n'); } diff --git a/llvm/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp b/llvm/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp index b9147e933c53..131801b56f4a 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp +++ b/llvm/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp @@ -549,7 +549,7 @@ static PrototypeAST *ParsePrototype() { // Read the precedence if present. if (CurTok == tok_number) { if (NumVal < 1 || NumVal > 100) - return ErrorP("Invalid precedecnce: must be 1..100"); + return ErrorP("Invalid precedence: must be 1..100"); BinaryPrecedence = (unsigned)NumVal; getNextToken(); } diff --git a/llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp b/llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp index 0a6254da7063..0680be37fe09 100644 --- a/llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp +++ b/llvm/examples/Kaleidoscope/MCJIT/lazy/toy.cpp @@ -550,7 +550,7 @@ static PrototypeAST *ParsePrototype() { // Read the precedence if present. if (CurTok == tok_number) { if (NumVal < 1 || NumVal > 100) - return ErrorP("Invalid precedecnce: must be 1..100"); + return ErrorP("Invalid precedence: must be 1..100"); BinaryPrecedence = (unsigned)NumVal; getNextToken(); } @@ -626,7 +626,7 @@ std::string MakeLegalFunctionName(std::string Name) // Start with what we have NewName = Name; - // Look for a numberic first character + // Look for a numeric first character if (NewName.find_first_of("0123456789") == 0) { NewName.insert(0, 1, 'n'); } diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c b/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c index b95462f340f2..30806dc8d29e 100644 --- a/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c +++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/OrcV2CBindingsBasicUsage.c @@ -55,7 +55,8 @@ LLVMOrcThreadSafeModuleRef createDemoModule(void) { LLVMDisposeBuilder(Builder); // Create a new ThreadSafeContext to hold the context. - LLVMOrcThreadSafeContextRef TSCtx = LLVMOrcCreateNewThreadSafeContext(); + LLVMOrcThreadSafeContextRef TSCtx = + LLVMOrcCreateNewThreadSafeContextFromLLVMContext(Ctx); // Our demo module is now complete. Wrap it and our ThreadSafeContext in a // ThreadSafeModule. diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c b/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c index 62904d006da6..7e4d2387cb14 100644 --- a/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c +++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/OrcV2CBindingsIRTransforms.c @@ -46,7 +46,8 @@ LLVMOrcThreadSafeModuleRef createDemoModule(void) { LLVMValueRef Result = LLVMBuildAdd(Builder, SumArg0, SumArg1, "result"); LLVMBuildRet(Builder, Result); LLVMDisposeBuilder(Builder); - LLVMOrcThreadSafeContextRef TSCtx = LLVMOrcCreateNewThreadSafeContext(); + LLVMOrcThreadSafeContextRef TSCtx = + LLVMOrcCreateNewThreadSafeContextFromLLVMContext(Ctx); LLVMOrcThreadSafeModuleRef TSM = LLVMOrcCreateNewThreadSafeModule(M, TSCtx); LLVMOrcDisposeThreadSafeContext(TSCtx); return TSM; diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/OrcV2CBindingsVeryLazy.c b/llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/OrcV2CBindingsVeryLazy.c index 3c1ff8392eff..c63a72f1470f 100644 --- a/llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/OrcV2CBindingsVeryLazy.c +++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/OrcV2CBindingsVeryLazy.c @@ -91,7 +91,8 @@ LLVMErrorRef parseExampleModule(const char *Source, size_t Len, } // Create a new ThreadSafeContext to hold the context. - LLVMOrcThreadSafeContextRef TSCtx = LLVMOrcCreateNewThreadSafeContext(); + LLVMOrcThreadSafeContextRef TSCtx = + LLVMOrcCreateNewThreadSafeContextFromLLVMContext(Ctx); // Our module is now complete. Wrap it and our ThreadSafeContext in a // ThreadSafeModule. |
