search for: isvalidnam

Displaying 7 results from an estimated 7 matches for "isvalidnam".

Did you mean: isvalidname
2013 May 02
4
[LLVMdev] int to StringRed conversion
Hello everyone, I have an integer and I want to convert it to StringRef in order to set metadata. setMetadata->(StringRef, MDNode*); It is there a native LLVM way to do it? 1. In the llvm::APSInt Class is toString() method, which seems it is not for this purpose 2. itoa and string are not part of LLVM 3. stringstream is not part of LLVM 4. to_string is not part of LLVM 5. any casting method?
2013 May 02
2
[LLVMdev] int to StringRed conversion
...help! >>> >>> Almost solved my problem. Now I don't have any compilation errors. I >>> have only one segfault: >>> >>> opt: LLVMContext.cpp:147: unsigned int >>> llvm::LLVMContext::getMDKindID(llvm::StringRef) const: Assertion >>> `isValidName(Name) && "Invalid MDNode name"' failed. >>> >>> This is due because when I setMetadata() it failes. >>> >>> StringRef tsts = llvm::Twine(srsr).str(); >>> .... >>> LLVMContext& C = is->getContext(); >>> MDNo...
2013 May 02
0
[LLVMdev] int to StringRed conversion
...>> Thank you for your help! >> >> Almost solved my problem. Now I don't have any compilation errors. I have >> only one segfault: >> >> opt: LLVMContext.cpp:147: unsigned int >> llvm::LLVMContext::getMDKindID(llvm::StringRef) const: Assertion >> `isValidName(Name) && "Invalid MDNode name"' failed. >> >> This is due because when I setMetadata() it failes. >> >> StringRef tsts = llvm::Twine(srsr).str(); >> .... >> LLVMContext& C = is->getContext(); >> MDNode* N = MDNode::get(C, MDStr...
2018 Oct 05
2
Dots are not fixed by make.names()
Hi It seems that names of the form "..#" and "..." are not fixed by make.names(), even though they are reserved words. The documentation reads: > [...] Names such as ".2way" are not valid, and neither are the reserved words. > Reserved words in R: [...] ... and ..1, ..2 etc, which are used to refer to arguments passed down from a calling function, see
2013 May 02
0
[LLVMdev] int to StringRed conversion
...>>> Almost solved my problem. Now I don't have any compilation errors. I >>>> have only one segfault: >>>> >>>> opt: LLVMContext.cpp:147: unsigned int >>>> llvm::LLVMContext::getMDKindID(llvm::StringRef) const: Assertion >>>> `isValidName(Name) && "Invalid MDNode name"' failed. >>>> >>>> This is due because when I setMetadata() it failes. >>>> >>>> StringRef tsts = llvm::Twine(srsr).str(); >>>> .... >>>> LLVMContext& C = is->getCont...
2011 Jun 30
2
Syntactically valid names
Hi all, Is there any easy way to tell if a string is a syntactically valid name? e.g. is.syntactic("X123") # TRUE is.syntactic("[[") # FALSE One implementation would be: is.syntactic <- function(x) x == make.names(x) but I wonder if there's a more elegant way. Thanks! Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice
2013 May 02
0
[LLVMdev] int to StringRed conversion
Hi, I think you may try to use llvm::Twine(int). For example, to convert 30 to string, you can use: Twine(30).str() To convert the string back to integer, you can try the StringRef::getAsInteger(unsigned, APInt &). For example: APInt i; str.getAsInteger(/*radix=*/ 10, /*output=*/ i); Sincerely, Logan On Thu, May 2, 2013 at 9:53 PM, Alexandru Ionut Diaconescu <