mirror of
https://github.com/apache/impala.git
synced 2026-01-01 00:00:20 -05:00
Added the ability to print a Value* in CodegenDebugTrace and a new GetIntConstant() method to LlvmCodegen. Change-Id: I15f23fc57a3045c856b2cf3de4e940718f7e44ec Reviewed-on: http://gerrit.cloudera.org:8080/2049 Reviewed-by: Skye Wanderman-Milne <skye@cloudera.com> Tested-by: Internal Jenkins
23 lines
562 B
C++
23 lines
562 B
C++
// Copyright (c) 2012 Cloudera, Inc. All right reserved.
|
|
|
|
// This is a test-only file. It was used to generate test-loop.bc
|
|
// which is used by the unit test to exercise loading precompiled
|
|
// ir.
|
|
#include <stdio.h>
|
|
|
|
__attribute__ ((noinline)) void DefaultImplementation() {
|
|
printf("Default\n");
|
|
}
|
|
|
|
void TestLoop(int n) {
|
|
for (int i = 0; i < n; ++i) {
|
|
DefaultImplementation();
|
|
}
|
|
}
|
|
|
|
// Unused function to make sure printf declaration is included in IR module. Used by
|
|
// LlvmCodegen::CodegenDebugTrace().
|
|
void printf_dummy_fn() {
|
|
printf("dummy");
|
|
}
|