Displaying 11 results from an estimated 11 matches for "escapestring".
2006 Jul 16
1
Generating valid R code using R
...ad a sequence of characters from file and escape them such that they
can be put in quotation marks to form a valid R code string. Example:
Let the input file be (four rows containing ASCII 0-255 characters):
abcdef<tab>ghijk\nlmno
second row\t\a\\
fourth and so on...
<EOF>
Now, find escapeString() such that the following piece of code
generates a second file called 'file2.txt' which is identical to
'file1.txt':
inStr <- readChar("file1.txt", nchars=999)
esStr <- escapeString(inStr)
rCode <- sprintf('cat(file="file2.txt", "%s")'...
2006 Jul 16
1
Generating valid R code using R
...ad a sequence of characters from file and escape them such that they
can be put in quotation marks to form a valid R code string. Example:
Let the input file be (four rows containing ASCII 0-255 characters):
abcdef<tab>ghijk\nlmno
second row\t\a\\
fourth and so on...
<EOF>
Now, find escapeString() such that the following piece of code
generates a second file called 'file2.txt' which is identical to
'file1.txt':
inStr <- readChar("file1.txt", nchars=999)
esStr <- escapeString(inStr)
rCode <- sprintf('cat(file="file2.txt", "%s")'...
2009 Feb 27
4
[LLVMdev] -fPIC warning on every compile on Cygwin
On Fri, Feb 27, 2009 at 4:32 PM, Jay Foad <jay.foad at gmail.com> wrote:
> >> Could you please rig Makefile.rules or something to print out the value
> >> of $(LLVM_ON_WIN32) ? The only way I can think of this happening is if
> >> that's erroneously false.
>
> This works for me:
>
> Index: Makefile.rules
>
2009 Feb 27
0
[LLVMdev] -fPIC warning on every compile on Cygwin
...Hello.dll
/usr/build/llvm-65633/lib/Transforms/Hello/Debug/Hello.o: In function
`_ZN79_GLO
BAL__N__usr_src_llvm_65633_lib_Transforms_Hello_Hello.cpp_00000000_965F4EBD6Hell
o213runOnFunctionERN4llvm8FunctionE':
/usr/src/llvm-65633/lib/Transforms/Hello/Hello.cpp:53: undefined reference
to `l
lvm::EscapeString(std::basic_string<char, std::char_traits<char>,
std::allocator
<char> >&)'
/usr/src/llvm-65633/lib/Transforms/Hello/Hello.cpp:54: undefined reference
to `l
lvm::cerr'
/usr/build/llvm-65633/lib/Transforms/Hello/Debug/Hello.o: In function
`_ZN79_GLO
BAL__N__usr_src_llvm_...
2010 Oct 25
1
[LLVMdev] sprintf -> snprintf conversion
...cure' C apis, especially related to memory bounds checking.
Thus using functions like sprintf/strcpy/etc usually spits out a
linker warning in base toolchain like this one:
/home/proger/dev/llvm/Debug+Asserts/lib/libclangFrontend.a(DocumentXML.o) (.text+0xc65): In function `clang::DocumentXML::escapeString(char const*, unsigned long)':
/home/proger/dev/llvm/tools/clang/lib/Frontend/DocumentXML.cpp:107: warning: sprintf() is often misused, please use snprintf()
I've done some conversions from sprintf to snprintf, please commit those.
-------------- next part --------------
Index: include/llvm...
2009 Mar 02
0
[LLVMdev] Fw: -fPIC warning on every compile on Cygwin
...uild/llvm-65633/lib/Transforms/Hello/Debug/Hello.o: In function `_ZN79_GLO
BAL__N__usr_src_llvm_65633_lib_Transforms_Hello_Hello.cpp_00000000_965F4EBD6Hell
o213runOnFunctionERN4llvm8FunctionE':
/usr/src/llvm-65633/lib/Transforms/Hello/Hello.cpp:53: undefined reference to `l
lvm::EscapeString(std::basic_string<char, std::char_traits<char>, std::allocator
<char> >&)'
/usr/src/llvm-65633/lib/Transforms/Hello/Hello.cpp:54: undefined reference to `l
lvm::cerr'
/usr/build/llvm-65633/lib/Transforms/Hello/Debug/Hello.o: In function `_ZN79_GLO
B...
2009 Mar 03
0
[LLVMdev] -fPIC warning on every compile on Cygwin
...function `_ZN79_GLO
> BAL__N__usr_src_llvm_65633_lib_Transforms_Hello_Hello.cpp_00000000_965F4EBD6Hell
> o213runOnFunctionERN4llvm8FunctionE':
> /usr/src/llvm-65633/lib/Transforms/Hello/Hello.cpp:53: undefined
> reference to `l
> lvm::EscapeString(std::basic_string<char,
> std::char_traits<char>, std::allocator
> <char> >&)'
> /usr/src/llvm-65633/lib/Transforms/Hello/Hello.cpp:54: undefined
> reference to `l
> lvm::cerr'
> /usr/build/llvm-65633/li...
2007 Apr 25
2
[LLVMdev] ModulePass that requires FunctionPass
...======//
struct Hello3 : public ModulePass {
virtual bool runOnModule(Module &M) {
HelloCounter++;
for (Module::iterator i = M.begin(), e = M.end(); i != e; ++i) {
LoopInfo &LI = getAnalysis<LoopInfo>(*i);
std::string fname = i->getName();
EscapeString(fname);
cerr << "Hello: " << fname << "\n";
}
return false;
}
// We don't modify the program, so we preserve all analyses
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
AU.add...
2010 Apr 06
0
[LLVMdev] Get the loop trip count variable
...My pass looks like:
----------------------------------
virtual bool runOnFunction(Function &F) {
LoopInfo &LI = getAnalysis<LoopInfo>();
CFGInstCounter++;
std::string fname = F.getName();
EscapeString(fname);
cerr << "Function " << fname;
if (LI.empty())
cout << " doesn't have loops" << endl;
else
cout << &q...
2010 Apr 06
2
[LLVMdev] Get the loop trip count variable
Thanks a lot for your guys' help!!!
I guess once I am able to get *V* (which probably is a pointer to a
Value object), then, I can instrument some code at the IR level to
dump V. As long as I maintain V at this pass stage, I should be able
to dump the loop trip count. This is true, isn't it?
Basically, what I am going to do is to add a function call before the
loop body, such as:
2011 Apr 05
3
[LLVMdev] Building LLVM on Solaris/Sparc
...lvm::Value*,
llvm::AliasSetTracker*)/n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/opt.o
llvm::FunctionPass::assignPassManager(llvm::PMStack&, llvm::PassManagerType)
/n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/GraphPrinters.o
llvm::DOT::EscapeString(std::basic_string<char, std::char_traits<char>,
std::allocator<char> >
const&)/n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/GraphPrinters.o
llvm::FindUsedTypes::ID
/n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/opt.o
llv...