X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=unittests%2FOption%2FOptionParsingTest.cpp;h=30944d9be797657700208e623982666f6853fdda;hb=fc699872e35ec794d7373680be6f1946fe8e9ca6;hp=c90691ad15368a5e7fccbaa83c4d1914707fce6b;hpb=3fe36d0fddd38e05daeb6f967fd0044a373a8f09;p=oota-llvm.git diff --git a/unittests/Option/OptionParsingTest.cpp b/unittests/Option/OptionParsingTest.cpp index c90691ad153..30944d9be79 100644 --- a/unittests/Option/OptionParsingTest.cpp +++ b/unittests/Option/OptionParsingTest.cpp @@ -7,6 +7,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ADT/OwningPtr.h" #include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" @@ -60,7 +61,11 @@ const char *Args[] = { TEST(Support, OptionParsing) { TestOptTable T; unsigned MAI, MAC; - InputArgList *AL = T.ParseArgs(Args, Args + (sizeof(Args) / sizeof(Args[0])), MAI, MAC); + OwningPtr + AL(T.ParseArgs(Args, + Args + (sizeof(Args) / sizeof(Args[0])), + MAI, + MAC)); // Check they all exist. EXPECT_TRUE(AL->hasArg(OPT_A));