[PATCH] D83122: Fix crash when getVFABIMappings is called with an indirect call instruction
Sanne Wouda via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 10 02:25:32 PDT 2020
sanwou01 requested review of this revision.
sanwou01 marked 2 inline comments as done.
sanwou01 added inline comments.
================
Comment at: llvm/unittests/Analysis/VectorFunctionABITest.cpp:12
#include "llvm/IR/InstIterator.h"
+#include "llvm/IRReader/IRReader.h"
#include "gtest/gtest.h"
----------------
fpetrogalli wrote:
> Is this needed?
For the definition of parseAssemblyString, yes.
================
Comment at: llvm/unittests/Analysis/VectorFunctionABITest.cpp:634
+ LLVMContext C;
+ std::unique_ptr<Module> M = parseIR(C, R"IR(
+define void @call(void () * %f) {
----------------
fpetrogalli wrote:
> Very elegant, but is this `unique_ptr` needed?
"borrowed" from other unit tests, so I can only take credit for finding it. I do think the `unique_ptr` is needed: parseAssemblyString passes ownership of the Module to us, so it'd be rude to drop it on the floor.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83122/new/
https://reviews.llvm.org/D83122
More information about the llvm-commits
mailing list