Skip to content

Instantly share code, notes, and snippets.

@mn4367
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mn4367/57bbed35f643a9a0f40f to your computer and use it in GitHub Desktop.
Save mn4367/57bbed35f643a9a0f40f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Hyphenation test</title>
</head>
<body style="width: 10cm;">
<p lang="en">
xClang is in&shy;ten&shy;ded spe&shy;cific&shy;ally to work on top of LLVM.
The com&shy;bin&shy;a&shy;tion of Clang and LLVM provides the ma&shy;jor&shy;ity
of a tool&shy;chain, al&shy;low&shy;ing the re&shy;place&shy;ment of the whole
GCC stack. Be&shy;cause it is built with a lib&shy;rary-based design, like the
rest of LLVM, Clang is easy to em&shy;bed in&shy;to oth&shy;er ap&shy;plic&shy;a&shy;tions.
This is one reas&shy;on why a ma&shy;jor&shy;ity of the Open&shy;CL
im&shy;ple&shy;ment&shy;a&shy;tions are built with Clang and LLVM. One of
Clang's primary goals is to bet&shy;ter sup&shy;port in&shy;cre&shy;ment&shy;al
com&shy;pil&shy;a&shy;tion to al&shy;low the com&shy;piler to be more tightly tied
to the IDE GUI. GCC is de&shy;signed to work in a "clas&shy;sic"
com&shy;pile-link-de&shy;bug cycle, and al&shy;though it provides use&shy;ful
ways to sup&shy;port in&shy;cre&shy;ment&shy;al and in&shy;ter&shy;rup&shy;ted
com&shy;pil&shy;ing on-the-fly, in&shy;teg&shy;rat&shy;ing them with oth&shy;er
tools is not al&shy;ways easy. For in&shy;stance, GCC uses a step called "fold"
that is key to the over&shy;all com&shy;pile pro&shy;cess, which has the side ef&shy;fect
of trans&shy;lat&shy;ing the code tree in&shy;to a form that does not look very
much like the ori&shy;gin&shy;al source code. If an er&shy;ror is found dur&shy;ing
or after the fold step, it can be dif&shy;fi&shy;cult to trans&shy;late that back
in&shy;to a single loc&shy;a&shy;tion in the ori&shy;gin&shy;al source.
Ad&shy;di&shy;tion&shy;ally, vendors us&shy;ing the GCC stack with&shy;in IDEs
used sep&shy;ar&shy;ate tools to in&shy;dex the code to provide fea&shy;tures l
ike syn&shy;tax high&shy;light&shy;ing and auto&shy;com&shy;plete.
Clang is de&shy;signed to re&shy;tain more in&shy;form&shy;a&shy;tion
dur&shy;ing the com&shy;pil&shy;a&shy;tion pro&shy;cess than GCC, and
pre&shy;serve the over&shy;all form of the ori&shy;gin&shy;al code. The
ob&shy;ject&shy;ive of this is to make it easi&shy;er to map er&shy;rors back
in&shy;to the ori&shy;gin&shy;al source. The er&shy;ror re&shy;ports offered
by Clang are also aimed to be more de&shy;tailed and spe&shy;cif&shy;ic, as
well as ma&shy;chine-read&shy;able, so IDEs can in&shy;dex the out&shy;put of
the com&shy;piler dur&shy;ing com&shy;pil&shy;a&shy;tion. Mod&shy;u&shy;lar
design of the com&shy;piler can of&shy;fer source code in&shy;dex&shy;ing,
syn&shy;tax check&shy;ing, and oth&shy;er fea&shy;tures nor&shy;mally
as&shy;so&shy;ci&shy;ated with rap&shy;id ap&shy;plic&shy;a&shy;tion
de&shy;vel&shy;op&shy;ment sys&shy;tems. The parse tree is also more
suit&shy;able for sup&shy;port&shy;ing auto&shy;mated code
re&shy;fact&shy;or&shy;ing, as it re&shy;mains in a pars&shy;able text form
at all times. Changes to the pro&shy;gram can be checked by diff&shy;ing the
in&shy;ter&shy;me&shy;di&shy;ate form (IF).
</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment