我是 llvm 的新手,我正在尝试在 IR 中找到所有函数调用指令。我的代码如下所示:
for (BasicBlock &BB : F) {
for (Instruction &inst : BB) {
errs() << "\n => " << inst << "\n";
// if (dyn_cast<CallInst>(&inst) || dyn_cast<InvokeInst>(&inst)) {
if(inst.getOpcode() == Instruction::Call || inst.getOpcode() == Instruction::Invoke) {
errs() << "\n callinst => " << inst << "\n";
}
}
}
Run Code Online (Sandbox Code Playgroud)
但这对查找函数调用指令不起作用。例如,对于此指令:
call void @func2(i32* %num)
Run Code Online (Sandbox Code Playgroud)
代码找不到它。
我为此指令做了一些实验:
inst.getOpcodeName() == "call"
inst.getOpcode() == 56
Run Code Online (Sandbox Code Playgroud)
但:
Instruction::Call == 54
Instruction::UserOp1 == 56
Run Code Online (Sandbox Code Playgroud)
我有一些问题:
我正在尝试按照文档中的步骤将字体“Noto Sans Canadian”添加到 TinyMCE 编辑器中。
不过好像没有添加字体。我什至尝试使用此方法删除一种默认字体,但似乎更改没有更新。
onload = function() {
tinymce.init({
selector: 'textarea',
plugins: 'directionality anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount',
toolbar: 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table mergetags | addcomment showcomments | spellcheckdialog a11ycheck | align lineheight | checklist numlist bullist indent outdent | emoticons charmap | removeformat ltr rtl',
tinycomments_mode: 'embedded',
tinycomments_author: 'Admin',
mergetags_list: [
{ value: 'First.Name', title: 'First …Run Code Online (Sandbox Code Playgroud)