I'm working on a program in LLVM IR, and I am trying to initialize a string that says "Hello World!" but I can't figure out how. The goal of the code is to count the number of characters in the string. Before the string needs to be initialized, and after the headers, I have the following:
int main (int argc, const char *argv[]) {
//Setting up
//Build a pointer to the string - LLVMValueRef *strptr=LLVMBuildGlobalStringPtr(builder, const char *string, const char *name);
LLVMValueRef *strptr;
LLVMContextRef context = LLVMContextCreate();
LLVMBuilderRef builder = LLVMCreateBuilderInContext (context);
LLVMModuleRef module1 = LLVMModuleCreateWithNameInContext("mod", context);
}