Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
字符串在 LLVM IR 中都表示ConstantDataSequential为 Constant 的子类。如果你想要 stringref,你必须明确告诉 LLVM 通过调用ConstantDataSequential. 具体来说,您需要在转换获得的指针后调用以下一个或多个 LLVM API:
ConstantDataSequential
isString (unsigned CharSize=8)
isCString ()
getAsString ()
getAsCString ()