MCPcopy Create free account
hub / github.com/apache/impala / StoreHelper

Method StoreHelper

be/src/codegen/llvm-codegen-cache-test.cc:633–646  ·  view source on GitHub ↗

Helper function to store a specific key to the global codegen cache.

Source from the content-addressed store, hash-verified

631
632/// Helper function to store a specific key to the global codegen cache.
633void LlvmCodeGenCacheTest::StoreHelper(TCodeGenCacheMode::type mode, string key) {
634 // Create a LlvmCodeGen containing a codegen function Echo.
635 scoped_ptr<LlvmCodeGen> codegen;
636 ASSERT_OK(LlvmCodeGen::CreateImpalaCodegen(fragment_state_, nullptr, "test", &codegen));
637 shared_ptr<CodeGenObjectCache> engine_cache =
638 CreateObjCache(true /*is_double*/, nullptr /*module_id*/);
639 codegen->engine_cache_ = engine_cache;
640 CodeGenCacheKey cache_key;
641 CodeGenCacheEntry entry;
642 CodeGenCacheKeyConstructor::construct(key, &cache_key);
643 EXPECT_OK(codegen_cache_->Store(cache_key, codegen.get(), mode, opt_level_));
644 CheckObjCacheExists(codegen.get());
645 codegen->Close();
646}
647
648/// Concurrently store random entries to the global codegen cache, and check if all
649/// the resources alright.

Callers

nothing calls this directly

Calls 3

getMethod · 0.65
StoreMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected