diff --git a/lib/Frontend/nvqpp/ConvertDecl.cpp b/lib/Frontend/nvqpp/ConvertDecl.cpp index 1e75f6dedd..78a86bb164 100644 --- a/lib/Frontend/nvqpp/ConvertDecl.cpp +++ b/lib/Frontend/nvqpp/ConvertDecl.cpp @@ -157,7 +157,12 @@ bool QuakeBridgeVisitor::interceptRecordDecl(clang::RecordDecl *x) { auto templArg = tempSpec->getTemplateArgs()[0]; assert(templArg.getKind() == clang::TemplateArgument::ArgKind::Integral); - std::int64_t size = templArg.getAsIntegral().getExtValue(); + auto getExtValueHelper = [&](auto v) -> std::int64_t { + if (v.isUnsigned()) + return static_cast(v.getZExtValue()); + return v.getSExtValue(); + }; + std::int64_t size = getExtValueHelper(templArg.getAsIntegral()); if (size != static_cast(std::dynamic_extent)) return pushType(quake::VeqType::get(ctx, size)); } diff --git a/tpls/llvm b/tpls/llvm index c0b45fef15..7cbf1a2591 160000 --- a/tpls/llvm +++ b/tpls/llvm @@ -1 +1 @@ -Subproject commit c0b45fef155fbe3f17f9a6f99074682c69545488 +Subproject commit 7cbf1a2591520c2491aa35339f227775f4d3adf6 diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index c6de856e3e..bbd058f653 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -133,6 +133,8 @@ target_link_libraries(test_spin gtest_main) gtest_discover_tests(test_spin) +add_subdirectory(plugin) + # build the test qudit execution manager add_subdirectory(qudit) add_executable(test_qudit main.cpp qudit/SimpleQuditTester.cpp) @@ -183,5 +185,3 @@ if (CUDAQ_ENABLE_PYTHON) TEST_SUFFIX _Sampling PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_BINARY_DIR}/python") endif() -add_subdirectory(plugin) -